<!DOCTYPE>
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8"/>
		<title>关注微信公众号</title>
		<script src="js/jquery.min.js?v=4.2.1.1"></script>
		<script type="text/javascript">
		function getUrlParam(name) {
	        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
	        if (r != null) return unescape(r[2]);
	        return null; //返回参数值
	    }
		
		//判断是否用户已关注 诺亚舟官方公众号
		$(document).ready(function(){ 
			var code = getUrlParam("code"); 
			var subscribe = 0;
			//生产环境URL
			//var info_url = "http://pmc.noahedu.com/push/cross/winxin/info.json";
			//测试环境URL
			//var info_url = "http://192.168.1.58:8086/push/cross/winxin/info.json";
			//外网测试环境
			var info_url = "http://test.pmc.noahedu.com/push/cross/winxin/info.json";

			//var wx_location_url = "https://weixin.qq.com/r/4kxUTEDEFx1orQQv9xnw";
			var wx_location_url = "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzA4MDM1Nzk0MA==&scene=110#wechat_redirect";
			$.post(info_url,{"code":code},function(retData){
			　　　if(retData != null){
				   if(retData.msgCode == 309){
					   subscribe = retData.data.info.subscribe 
					   if(subscribe == 0){
						   window.location.href = wx_location_url;
						   //createQcode();
					   }else{
						   window.location.href = "app_down_wx.html";
					   }
				   }else{
					   window.location.href = wx_location_url;
					   //createQcode();
				   }
				   
			　　　}
			},"json");
			
		  });


			//window.location.href = wx_location_url

	</script>
	</head>
	<body>
	</body>
</html>